<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
    <title>Edit Excursion</title>
</h:head>
<h:body onload="#{ExcursionEditManaged.loadExcursion()}">
	<h:form>
	<p:menubar>  
        <p:submenu label="Package Section" >  
            <p:menuitem value="Create Package" url="packageInsertion.xhtml" />  
            <p:menuitem value="All Packages" url="package.xhtml" />  
        </p:submenu>  
  
        <p:submenu label="Hotel Section" >  
            <p:menuitem value="Add Hotel" url="hotelInsert.xhtml" />  
            <p:menuitem value="All Hotel" url="hotel.xhtml" />  
        </p:submenu>  
        
         <p:submenu label="Transportation Section" >  
            <p:menuitem value="Add Transportation" url="transportationInsert.xhtml" />  
            <p:menuitem value="All Transportation" url="transportationMean.xhtml" />  
        </p:submenu>  
        
         <p:submenu label="Excursion Section" >  
            <p:menuitem value="Add Excursion" url="excursionInsert.xhtml" />  
            <p:menuitem value="All Excursion" url="excursion.xhtml" />  
        </p:submenu>  
  
       <f:facet name="options">   
       		<p:commandButton value="Check OutDated Package" action="#{CheckInvalid.checkAll()}"/>
            <p:commandButton value="Logout" action="#{LoginManaged.logout()}"/>
       </f:facet>
    </p:menubar> 
    </h:form>
    <h:form> 
		<p:panelGrid columns="3">
			<p:outputLabel value = "Name:"/>
			<p:inputText id="name" value="#{ExcursionEditManaged.eDTO.name}"/>
			<p:message for="name" />
			
			<p:outputLabel value = "Available Places:"/>
			<p:inputText id="availablePlaces" value="#{ExcursionEditManaged.eDTO.availablePlaces}"/>
			<p:message for="availablePlaces" />
			
			<p:outputLabel value = "Description:"/>
			<p:inputText id="description" value="#{ExcursionEditManaged.eDTO.description}"/>
			<p:message for="description" />
			
			<p:outputLabel value = "Duration: "/>
			<p:inputText id="duration" value="#{ExcursionEditManaged.eDTO.duration}"/>
			<p:message for="duration" />
			
			<p:outputLabel value = "Date:"/>
			<h:outputText value="#{ExcursionEditManaged.eDTO.date}">
  				<f:convertDateTime type="date" pattern="dd-MM-yyyy" timeZone="Europe/Paris"/>
			</h:outputText>
    		<p:outputLabel value = " Not Editable"/>
			
			<p:outputLabel value = "City:"/>
			<p:outputLabel id="city" value="#{ExcursionEditManaged.eDTO.city}"/>
			<p:outputLabel value = " Not Editable"/>
			
			<p:outputLabel value = "Type:"/>
			<p:inputText id="type" value="#{ExcursionEditManaged.eDTO.type}"/>
			<p:message for="type" />
			
			<p:outputLabel value = "Price:"/>
			<p:outputLabel id="price" value="#{ExcursionEditManaged.eDTO.price}"/>
			<p:outputLabel value=" Not Editable" />	
		<f:facet name="footer">
			<p:commandButton value="Save" action="#{ExcursionEditManaged.update}" ajax="false" />
		</f:facet>
		</p:panelGrid>
		<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
	</h:form>
</h:body>
</html>